package com.frank.oj.service.oj;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.frank.model.entity.common.Announcement;
import com.frank.oj.common.result.CommonResult;
import com.frank.oj.model.dto.ContestPrintDTO;
import com.frank.oj.model.dto.ContestRankDTO;
import com.frank.oj.model.dto.RegisterContestDTO;
import com.frank.oj.model.dto.UserReadContestAnnouncementDTO;
import com.frank.oj.model.vo.*;

import java.util.List;

/**
 * @author frank
 * @Date 2024/3/23
 */
public interface ContestService {
    CommonResult<IPage<ContestVO>> getContestList(Integer limit, Integer currentPage, Integer status, Integer type, String keyword);

    CommonResult<ContestVO> getContestInfo(Long cid);

    CommonResult<IPage<AnnouncementVO>> getContestAnnouncement(Long cid, Integer limit, Integer currentPage);

    CommonResult<List<Announcement>> getContestUserNotReadAnnouncement(UserReadContestAnnouncementDTO userReadContestAnnouncementDto);

    CommonResult<List<ContestProblemVO>> getContestProblem(Long cid, Boolean isContainsContestEndJudge);

    CommonResult<ProblemInfoVO> getContestProblemDetails(Long cid, String displayId, Boolean containsEnd);

    CommonResult<IPage<JudgeVO>> getContestSubmissionList(Integer limit, Integer currentPage, Boolean onlyMine, String displayId, Integer searchStatus, String searchUsername, Long searchCid, Boolean beforeContestSubmit, Boolean completeProblemID, Boolean containsEnd);

    CommonResult<IPage> getContestRank(ContestRankDTO contestRankDTO);

    CommonResult<Void> submitPrintText(ContestPrintDTO contestPrintDto);

    CommonResult<AccessVO> getContestAccess(Long cid);

    CommonResult<Void> toRegisterContest(RegisterContestDTO registerContestDto);

    CommonResult<List<RegisterVO>> getContestMember(Long cid);

    CommonResult<Void> updateContestMemberStatus(Long contestId, String username, Integer auth);
}
